package Test_319_4;

public class SalesEmployee extends ColaEmployee{

    double sales;//销售额
    double saleT;//提成率

    public SalesEmployee(String ColaName, int month, int ColaBirthday,double sales,double saleT){
        super(ColaName,month,ColaBirthday);
        this.sales = sales;
        this.saleT = saleT;

        //销售人员，工资由月销售额和提成率决定
        //如果员工过生日，则员工工资+100，否则销售额*提成率
        if (super.getMonth()==super.getColaBirthday()){
            System.out.println("=================员工过生日===================");
            System.out.println("员工"+ColaName+month+"月的工资为"+(sales*saleT)+100);
        }else {
            System.out.println("=================员工不过生日===================");
            System.out.println("员工"+ColaName+month+"月的工资为"+(sales*saleT));
        }
    }


}
